using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using DataObject.Helpers;

namespace DataObject.Model
{
	[Serializable]
	public class RouteDTO : DTOBase
	{
        public RouteDTO()
        {
            RouteID = Helper.NewSeqGuid();
            ModifiedDate = DateTime.Now;
        }

		#region Reference property Members


		#endregion

		#region Collection Members

		private IList<RouteServiceDTO> _routeServiceCollection = new List<RouteServiceDTO>();
		public IList<RouteServiceDTO> RouteServiceCollection
		{
			get
			{
				return _routeServiceCollection;
			}
			set
			{
				if (_routeServiceCollection != value)
				{
					_routeServiceCollection = value;
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Active

		private bool _active;

		/// <summary>
		///  Property Active
		/// <summary>
		public bool Active
		{
			get
			{
				return _active;
			}

			set
			{
				if (_active != value)
				{
					this.OnActiveChanging(value);
					_active = value;
					this.OnActiveChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Description

		private string _description;

		/// <summary>
		///  Property Description
		/// <summary>
		public string Description
		{
			get
			{
				return _description;
			}

			set
			{
				if (_description != value)
				{
					this.OnDescriptionChanging(value);
					_description = value;
					this.OnDescriptionChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedBy

		private string _modifiedBy;

		/// <summary>
		///  Property ModifiedBy
		/// <summary>
		public string ModifiedBy
		{
			get
			{
				return _modifiedBy;
			}

			set
			{
				if (_modifiedBy != value)
				{
					this.OnModifiedByChanging(value);
					_modifiedBy = value;
					this.OnModifiedByChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedDate

		private DateTime? _modifiedDate;

		/// <summary>
		///  Property ModifiedDate
		/// <summary>
		public DateTime? ModifiedDate
		{
			get
			{
				return _modifiedDate;
			}

			set
			{
				if (_modifiedDate != value)
				{
					this.OnModifiedDateChanging(value);
					_modifiedDate = value;
					this.OnModifiedDateChanged();
				}
			}
		}

		#endregion

		#region Property RouteID

		private Guid _routeID;

		/// <summary>
		///  Property RouteID
		/// <summary>
		public Guid RouteID
		{
			get
			{
				return _routeID;
			}

			set
			{
				if (_routeID != value)
				{
					this.OnRouteIDChanging(value);
					_routeID = value;
					this.OnRouteIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property RouteName

		private string _routeName;

		/// <summary>
		///  Property RouteName
		/// <summary>
		public string RouteName
		{
			get
			{
				return _routeName;
			}

			set
			{
				if (_routeName != value)
				{
					this.OnRouteNameChanging(value);
					_routeName = value;
					this.OnRouteNameChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property RouteNumber

		private int _routeNumber;

		/// <summary>
		///  Property RouteNumber
		/// <summary>
		public int RouteNumber
		{
			get
			{
				return _routeNumber;
			}

			set
			{
				if (_routeNumber != value)
				{
					this.OnRouteNumberChanging(value);
					_routeNumber = value;
					this.OnRouteNumberChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property SubRoute

        private char? _subRouteCode;

		/// <summary>
		///  Property SubRouteCode
		/// <summary>
        public char? SubRouteCode
		{
			get
			{
				return _subRouteCode;
			}

			set
			{
                if (_subRouteCode != value)
				{
					this.OnSubRouteCodeChanging(value);
                    _subRouteCode = value;
					this.OnSubRouteCodeChanged();
					OnChanged();
				}
			}
		}

		#endregion

        #region Property NumOfMeals

        private int? _numOfMeals;

        /// <summary>
        ///  Property NumOfMeals
        /// <summary>
        public int? NumOfMeals
        {
            get
            {
                return _numOfMeals;
            }

            set
            {
                if (_numOfMeals != value)
                {
                    this.OnNumOfMealsChanging(value);
                    _numOfMeals = value;
                    this.OnNumOfMealsChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property HasShuttle

        private bool? _hasShuttle;

        /// <summary>
        ///  Property HasShuttle
        /// <summary>
        public bool? HasShuttle
        {
            get
            {
                return _hasShuttle;
            }

            set
            {
                if (_hasShuttle != value)
                {
                    this.OnHasShuttleChanging(value);
                    _hasShuttle = value;
                    this.OnHasShuttleChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property HasFlight

        private bool? _hasFlight;

        /// <summary>
        ///  Property HasFlight
        /// <summary>
        public bool? HasFlight
        {
            get
            {
                return _hasFlight;
            }

            set
            {
                if (_hasFlight != value)
                {
                    this.OnHasFlightChanging(value);
                    _hasFlight = value;
                    this.OnHasFlightChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property ProviderName

        private string _providerName;

        /// <summary>
        ///  Property ProviderName
        /// <summary>
        public string ProviderName
        {
            get
            {
                return _providerName;
            }

            set
            {
                if (_providerName != value)
                {
                    this.OnProviderNameChanging(value);
                    _providerName = value;
                    this.OnProviderNameChanged();
                    OnChanged();
                }
            }
        }

        #endregion

		#region Extensibility Method Declarations

		protected virtual void OnActiveChanging(bool active) { }
		protected virtual void OnActiveChanged() { }
		protected virtual void OnDescriptionChanging(string description) { }
		protected virtual void OnDescriptionChanged() { }
		protected virtual void OnModifiedByChanging(string modifiedBy) { }
		protected virtual void OnModifiedByChanged() { }
		protected virtual void OnModifiedDateChanging(DateTime? modifiedDate) { }
		protected virtual void OnModifiedDateChanged() { }
		protected virtual void OnRouteIDChanging(Guid routeID) { }
		protected virtual void OnRouteIDChanged() { }
		protected virtual void OnRouteNameChanging(string routeName) { }
		protected virtual void OnRouteNameChanged() { }
		protected virtual void OnRouteNumberChanging(int routeNumber) { }
        protected virtual void OnRouteNumberChanged() { }
        protected virtual void OnSubRouteCodeChanging(char? subRouteCode) { }
        protected virtual void OnSubRouteCodeChanged() { }
        protected virtual void OnNumOfMealsChanging(int? numOfMeals) { }
        protected virtual void OnNumOfMealsChanged() { }
        protected virtual void OnHasShuttleChanging(bool? hasShuttle) { }
        protected virtual void OnHasShuttleChanged() { }
        protected virtual void OnHasFlightChanging(bool? hasFlight) { }
        protected virtual void OnHasFlightChanged() { }
        protected virtual void OnProviderNameChanging(string providerName) { }
        protected virtual void OnProviderNameChanged() { }

		#endregion

	}
}
